/**
 * Created by leo on 2/2.
 */
angular.module('panels')
    .directive('panelItilWorkflowMonthlyStatistics', function () {
        return {
            scope: {},
            link: function (scope) {
                scope.panelTitle = '月度工单量统计';
                scope.options = {
                    chart: {
                        type: 'spline'
                    },
                    colors: Highcharts.map(Highcharts.getOptions().colors, function (color) {
                        return {
                            radialGradient: {cx: 0.5, cy: 0.3, r: 0.7},
                            stops: [
                                [0, color],
                                [1, Highcharts.Color(color).brighten(-0.1).get('rgb')] // darken
                            ]
                        };
                    }),
                    title: {
                        text: '',
                        x: -20 //center
                    },
                    xAxis: {
                        categories: ['3月', '4月', '5月', '6月', '7月', '8月']
                    },
                    yAxis: {
                        title: {
                            enabled: false
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }],
                        min: 0
                    },
                    tooltip: {
                        valueSuffix: ''
                    },
                    series: [{
                        name: '客服',
                        data: [170, 169, 195, 145, 182, 215]
                    }, {
                        name: '告警',
                        data: [122, 118, 157, 113, 170, 220]
                    }, {
                        name: '地市',
                        data: [91, 61, 135, 84, 135, 170]
                    }, {
                        name: '集团',
                        data: [139, 142, 157, 85, 119, 152]
                    }]
                };
            },
            templateUrl: 'app/panel/highcharts-default.html'
        };
    });